Extend the max vcpu number for HVM guest.
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 29 Oct 2009 14:48:28 +0000 (14:48 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 29 Oct 2009 14:48:28 +0000 (14:48 +0000)
 - Originally the max vcpu number for HVM guest is 32, this patch
 extend the number to 128 on x86_64 hypervisor. (For i386 hypervisor,
 the max vcpu number  is still 32).
 - This patch extends the mp-table size to fit more vcpus.
 - HVM PV driver should call VCPUOP_register_vcpu_info hypercall to
 initialize the vcpu info if the vcpu number is more than 32.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
tools/firmware/rombios/rombios.c
xen/arch/x86/mm/shadow/common.c
xen/common/domctl.c
xen/include/asm-ia64/config.h
xen/include/asm-x86/config.h

index 2d97a401d52449825a564cc915703ee13e07c94c..8330f808c24759e2ebfc99a6fbfb82d973c486fa 100644 (file)
@@ -10734,11 +10734,19 @@ post_init_pic:
   out  0xa1, AL ;slave  pic: unmask IRQ 12, 13, 14
   ret
 
+
+  .align 16
+smbios_entry_point:
+  db 0,0,0,0,0,0,0,0 ; 8 bytes
+  db 0,0,0,0,0,0,0,0 ; 16 bytes
+  db 0,0,0,0,0,0,0,0 ; 24 bytes
+  db 0,0,0,0,0,0,0   ; 31 bytes
+
 ;; the following area can be used to write dynamically generated tables
   .align 16
 bios_table_area_start:
-  dd 0xaafb4442
-  dd bios_table_area_end - bios_table_area_start - 8;
+  db 0x5F, 0x5F, 0x5F, 0x48, 0x56, 0x4D, 0x4D, 0x50 ;; ___HVMMP
+  dd bios_table_area_end - bios_table_area_start
 
 ;--------
 ;- POST -
@@ -11843,41 +11851,6 @@ static Bit8u vgafont8[128*8]=
  0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0x00,
 };
 
-#ifdef HVMASSIST
-ASM_START
-
-//
-// MP Tables
-// just carve out some blank space for HVMLOADER to write the MP tables to
-//
-// NOTE: There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
-dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;; 832 bytes
-dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;; 896 bytes
-
-.align 16
-smbios_entry_point:
-db 0,0,0,0,0,0,0,0 ; 8 bytes
-db 0,0,0,0,0,0,0,0 ; 16 bytes
-db 0,0,0,0,0,0,0,0 ; 24 bytes
-db 0,0,0,0,0,0,0   ; 31 bytes
-ASM_END
-
-#endif // HVMASSIST
 ASM_START
 .org 0xcff0
 bios_table_area_end:
index a76ff6e4ce65515325f91e7f3949227934f69889..94457a328186a4a41ab22987eaa49a2afd5495ec 100644 (file)
@@ -3098,7 +3098,7 @@ int shadow_enable(struct domain *d, u32 mode)
     {
         unsigned int r;
         shadow_lock(d);                
-        r = sh_set_allocation(d, 256, NULL); /* Use at least 1MB */
+        r = sh_set_allocation(d, 1024, NULL); /* Use at least 4MB */
         if ( r != 0 )
         {
             sh_set_allocation(d, 0, NULL);
index 290b9494ddc35dccac46594312bfc565a5ff3010..0c417c7feaddc24187643fce17ce3c0a246486e2 100644 (file)
@@ -456,7 +456,7 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domctl_t) u_domctl)
         ret = -EINVAL;
         if ( (d == current->domain) || /* no domain_pause() */
              (max > MAX_VIRT_CPUS) ||
-             (is_hvm_domain(d) && max > XEN_LEGACY_MAX_VCPUS) )
+             (is_hvm_domain(d) && (max > MAX_HVM_VCPUS)) )
         {
             rcu_unlock_domain(d);
             break;
index 0d24feb19dac3e9da96554c9dfb86992f0babe93..8194b4476cf4984a614da686cd00a5ba94c8069a 100644 (file)
@@ -32,6 +32,7 @@
 #define NR_CPUS 64
 #endif
 #define MAX_VIRT_CPUS XEN_LEGACY_MAX_VCPUS
+#define MAX_HVM_VCPUS MAX_VIRT_CPUS
 #define CONFIG_NUMA
 #define CONFIG_ACPI_NUMA
 #define NODES_SHIFT 8                          /* linux/asm/numnodes.h */
index d465c3b1f9fe51726e2302d59fb814735e258078..8c9b3c1d9e6814e465fe95683fd7427f0397e701 100644 (file)
@@ -57,6 +57,9 @@
 #define MAX_VIRT_CPUS XEN_LEGACY_MAX_VCPUS
 #endif
 
+/* Maximum we can support with current vLAPIC ID mapping. */
+#define MAX_HVM_VCPUS 128
+
 #ifdef CONFIG_X86_SUPERVISOR_MODE_KERNEL
 # define supervisor_mode_kernel (1)
 #else